package com.googlecode.jasmincc.framework.services;

public class CharReplacementService {
	public static String replace(String source, char fromChar, char toChar) {
		StringBuffer buffer = new StringBuffer();

		for (char chr : source.toCharArray()) {
			if (chr == fromChar) {
				buffer.append(toChar);
			}
			else {
				buffer.append(chr);
			}
		}
		return buffer.toString();
	}
}
